<script setup lang="ts" name="InfraRedis">
import { ConfigApi } from '@/api/infra/config'

const loading = ref(true) // 是否加载中
const url = ref('')

/** 初始化 */
onMounted(async () => {
  try {
    const data = await ConfigApi.value('infra.monitor.redis')
    if (data && data.length > 0) {
      url.value = data
    }
  } finally {
    loading.value = false
  }
})
</script>

<template>
  <PageCard noPadding>
    <IFrame v-if="!loading" v-loading="loading" :src="url" />
  </PageCard>
</template>

<style scoped lang="scss"></style>
